from django.views.static import serve

from appDevice import views

from WebServer import settings
from django.urls import re_path

urlpatterns = [
    re_path(r'test_api/', views.test_api, name='test_api'),
    
    re_path(r'postLogin/', views.postLogin, name='postLogin'), # 用于用户注册提供的url 
    re_path(r'getGetDevice/', views.getGetDevice, name='getGetDevice'),
    re_path(r'postGetDevice/', views.postGetDevice, name='postGetDevice'), # 用于用户获取设备列表的url
    re_path(r'postSetDevice/', views.postSetDevice, name='postSetDevice'), # 用于用户获取设备列表的url
    re_path(r'postAddDevice/', views.postAddDevice, name='postAddDevice'), # 用于用户获取设备列表的url 
    re_path(r'postGetAddDeviceNum/', views.postGetAddDeviceNum, name='postGetAddDeviceNum'), # 用于用户获取设备列表的url
    re_path(r'^images/(?P<path>.*)$', serve, {"document_root": settings.STATICFILES_DIRS[0]}),
]